{% load static %}
<!DOCTYPE html>

<html>
<head>
    <link href="{% static "asciinema/asciinema-player.css" %}" rel="stylesheet" media="all">      <!-- 录像使用的-->
    <script type="text/javascript" src="{% static "asciinema/asciinema-player.min.js" %}"></script>  <!-- 录像使用的-->

    <!-- 引入核心的css文件 -->
    <link href="{% static "layui/css/layui.css" %}" rel="stylesheet" media="all">

    <script type="text/javascript" src="{% static "js/getUrlParam.js" %}"></script>  <!-- 获取 url 携带的值 -->

    <link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet" media="all">  <!-- 关闭 观看使用 -->

    <style>
        .video-player {
            width: 97%;
        }

    </style>

</head>
<body>
<div id="django-webssh-video" class="hide">

    <div class="ibox-content" id="id-ssh-content" style="padding: 0;">
        <p style="position:absolute; padding: 0; right:0; margin-right:17px; text-align: center; z-index: 999">
            <button class="btn btn-danger btn-lg" id="id-close-conn">关闭录像</button>
        </p>
        <div id="demo" class="video-player"  >
        </div>
    </div>
</div>


</body>

<script src="{% static "js/jquery-3.6.0.min.js" %}"></script>
<script>
    <!-- 获取ajex通过url传过来的值-这样子很危险的应该 -->
    var lxpath_temp = UrlParam.paramValues("path");
    //console.log(lxpath_temp)
    //console.log(lxpath_temp[0])
    //console.log("why???")
    //var video_temp = "/media/record/2022-08-30/2022-08-30_1126_192.168.56.117_root.cast"
    AsciinemaPlayer.create(lxpath_temp[0], document.getElementById('demo'));

    //终端右上角显示的关闭录像，当点击是，关闭ws
    $('#id-close-conn').click(function () {
        host_url = window.location.host;
        window.location.href = "http://" + host_url + "/index/websshlog/"
        // 直接跳转
    });

</script>
</html>
